//
//  UIConstantFont.m
//  CoolJF
//
//  Created by Apple on 2017/2/16.
//  Copyright © 2017年 Ubi. All rights reserved.
//
#import "UIConstantFont.h"

@implementation UIConstantFont
+ (UIFont *)getFontW3:(CGFloat)size
{
    return [UIFont systemFontOfSize:[self adjustUIFontSize:size] weight:UIFontWeightLight];
}
+ (UIFont *)getFontW6:(CGFloat)size
{
    return [UIFont systemFontOfSize:[self adjustUIFontSize:size]  weight:UIFontWeightRegular];
    
    
}
+ (UIFont *)getFontW9:(CGFloat)size
{
    return [UIFont systemFontOfSize:[self adjustUIFontSize:size]  weight:UIFontWeightBold];
}


+ (CGFloat)adjustUIFontSize:(CGFloat)size
{
    if (IPHONE4) {
        size = size*0.85;
    }
    
    if (IPHONE5) {
        
        size = size * 0.85;
    }
    if (IPHONE6_IPHONE7 || IPHONE_X) {
        
        size = size;
    }
    if (IPHONE6P_IPHONE7P) {
        
        size = size * 1.1;
    }
    if(IPHONE_XS){
         size = size * 1.1;
    }
    return size;
}

#pragma mark- 标准排版字体
+ (UIFont *)getFontH1
{
    return [self getFontW9_H18];
}
+ (UIFont *)getFontH2;
{
    return [self getFontW6_H17];
}
+ (UIFont *)getFontH3;
{
    return [self getFontW6_H16];
}
+ (UIFont *)getFontH4;
{
    return [self getFontW6_H15];
}
+ (UIFont *)getFontH5
{
    return [self getFontW6_H12];
}
+ (UIFont *)getFontH6
{
    return [self getFontW6_H10];
}


#pragma mark -
+ (UIFont *)getFontW3_H18
{
    return [self getFontW3:18.0];
}
+ (UIFont *)getFontW6_H18
{
    return [self getFontW6:18.0];
}

+ (UIFont *)getFontW9_H18
{
    return [self getFontW9:18.0];
}


+ (UIFont *)getFontW3_H17
{
    return [self getFontW3:17.0];
}
+ (UIFont *)getFontW6_H17
{
    return [self getFontW6:17.0];
}

+ (UIFont *)getFontW9_H17
{
    return [self getFontW9:17.0];
}

+ (UIFont *)getFontW3_H16
{
    return [self getFontW3:16.0];
}
+ (UIFont *)getFontW6_H16
{
    return [self getFontW6:16.0];
}

+ (UIFont *)getFontW9_H16
{
    return [self getFontW9:16.0];
}

+ (UIFont *)getFontW3_H15
{
    return [self getFontW3:15.0];
}
+ (UIFont *)getFontW6_H15
{
    return [self getFontW6:15.0];
}

+ (UIFont *)getFontW9_H15
{
    return [self getFontW9:15.0];
}

+ (UIFont *)getFontW3_H14
{
    return [self getFontW3:14.0];
}
+ (UIFont *)getFontW6_H14
{
    return [self getFontW6:14.0];
}

+ (UIFont *)getFontW9_H14
{
    return [self getFontW9:14.0];
}

+ (UIFont *)getFontW3_H13
{
    return [self getFontW3:13.0];
}
+ (UIFont *)getFontW6_H13
{
    return [self getFontW6:13.0];
}

+ (UIFont *)getFontW9_H13
{
    return [self getFontW9:13.0];
}

+ (UIFont *)getFontW3_H12
{
    return [self getFontW3:12.0];
}
+ (UIFont *)getFontW6_H12
{
    return [self getFontW6:12.0];
}

+ (UIFont *)getFontW9_H12
{
    return [self getFontW9:12.0];
}

+ (UIFont *)getFontW3_H11
{
    return [self getFontW3:11.0];
}
+ (UIFont *)getFontW6_H11
{
    return [self getFontW6:11.0];
}
+ (UIFont *)getFontW9_H11
{
    return [self getFontW9:11.0];
}


+ (UIFont *)getFontW3_H10
{
    return [self getFontW3:10.0];
}
+ (UIFont *)getFontW6_H10
{
    return [self getFontW6:10.0];
}
+ (UIFont *)getFontW9_H10
{
    return [self getFontW9:10.0];
}
    
+ (void)logFont
{
    for(NSString *fontfamilyname in [UIFont familyNames])
    {
        NSLog(@"family:'%@'",fontfamilyname);
        for(NSString *fontName in [UIFont fontNamesForFamilyName:fontfamilyname])
        {
            NSLog(@"\tfont:'%@'",fontName);
        }
        NSLog(@"-------------");
    }
}
@end
